cmake_minimum_required(VERSION 3.10)
project(gazebo_model_scanner)

# 查找 Gazebo 库和 TBB
find_package(gazebo REQUIRED)
find_package(Boost REQUIRED COMPONENTS system)
find_package(PkgConfig REQUIRED)  # 用于查找 TBB
pkg_check_modules(TBB tbb)        # 获取 TBB 的编译/链接参数

# 包含头文件目录
include_directories(
    ${GAZEBO_INCLUDE_DIRS}
    ${Boost_INCLUDE_DIRS}
    ${TBB_INCLUDE_DIRS}
)

# 添加可执行文件
add_executable(gz_demo gz_demo.cpp)

# 链接 Gazebo 和 TBB 库
target_link_libraries(gz_demo
    ${GAZEBO_LIBRARIES}
    ${Boost_LIBRARIES}
    ${TBB_LIBRARIES}
    pthread
    ${PROTOBUF_LIBRARIES}
)
